<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Float</title>
  <style>
    *{
      margin: 0;
      padding: 0;
      list-style: none;
    }
    .float{
      margin: 100px auto;
      position: relative;
      width: 700px;
      height: 400px;
      border: 1px solid red;
    }
    .float>div{
      width: 100px;
      height: 100px;
      border: 1px solid gray;
      opacity: .5;
      font-size: 12px;
      float: right;
    }
    .float>div:nth-child(2){
      clear: right;
    }
  </style>
</head>
<body>
  <div class="float">
    <div>1</div>
    <div>2</div>
    <div>3</div>
  </div>
</body>
</html>